package com.my.designPattern_old;

/**
 * 单例模式之五： 静态内部类， 懒加载且线程安全
 */
public class Singleton5 {

    private static class InnerClass{

        private static Singleton5 singleton5= new Singleton5();
    }

    private Singleton5 (){}

    public static Singleton5 getSingleton5(){
        return InnerClass.singleton5;
    }
}
